# 导入:
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session

# 初始化数据库连接:
engine = create_engine("mssql+pymssql://sa:ahu123@172.16.254.196:1433/Aircondition",
                       encoding='utf-8', echo=False)
# 创建DBSession类型:
session = scoped_session(sessionmaker(autocommit=False, autoflush=False, bind=engine))
